Skip to content

PerformanceEntryReporter::getMarkTime to return optional DOMHighResTimeStamp #51389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented May 16, 2025

Summary:

Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using HighResTimeStamp.

Differential Revision: D74837812

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 16, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74837812

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74837812

@hoxyq hoxyq force-pushed the export-D74837812 branch from 121e1a5 to 0b3face Compare May 16, 2025 17:18
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 16, 2025
…meStamp (facebook#51389)

Summary:
Pull Request resolved: facebook#51389

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.

Differential Revision: D74837812
@hoxyq hoxyq force-pushed the export-D74837812 branch from 0b3face to 3e92276 Compare May 19, 2025 13:48
hoxyq added a commit to hoxyq/react-native that referenced this pull request May 19, 2025
Summary:

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.


We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
 {F1978032319}

In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public and called by `NativePerformance`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.

Differential Revision: D74837812
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74837812

hoxyq pushed a commit to hoxyq/react-native that referenced this pull request May 19, 2025
Summary:
Pull Request resolved: facebook#51389

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.

We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
 {F1978032319}

In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public and called by `NativePerformance`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.

Differential Revision: D74837812
Summary:

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.


We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
 {F1978032319}

In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public, ca be called by `NativePerformance` and returns `std::optional`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.

Reviewed By: rubennorte

Differential Revision: D74837812
@hoxyq hoxyq force-pushed the export-D74837812 branch from 3e92276 to 92b1a7a Compare May 19, 2025 17:18
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74837812

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 19, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ce43342.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @hoxyq in ce43342

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants